import Vue from "vue"
import Vuex from "vuex"

import * as author from "@/utils/author"

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    use: author.getAuthor(),
    twoball: [],
    bigball: [],
    fucai3D: [],
    Threeline: [],
    Fiveline: [],
    sevenStare: [],
    sevenBall: [],
    whreeCity: "",
    idname: "",
    playwhereNum: "",
  },
  mutations: {
    //设置user
    setUse(state, use) {
      //保存到storage中
      author.setAuthor(use)
      //将用户信息更新到user
      state.use = use
    },
  },
  actions: {},
  modules: {},
})
